UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JAvaWry+c5xSLB0u1FStOM3WYWLRSJiZL8oUWh3UAnE='
WHERE
key_id = '021cf7f9d3f60fb3f5216f8ccb7f787ce49198ced67ba4615c66c672bc3d4dd5'
AND (
token = 'JAvaWry+c5xSLB0u1FStOM3WYWLRSJiZL8oUWh3UAnE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)