UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zYyGuauq/DNHXb6BcbKOzoBIXJlKEvxHlEoQIoolGKI='
WHERE
key_id = '7351dd68fcce0e268eff81d3dafc4fab230f660b0505848f1e0d0186fc534126'
AND (
token = 'zYyGuauq/DNHXb6BcbKOzoBIXJlKEvxHlEoQIoolGKI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)