UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/nw4l/E5g9VtLKx7sWtrt6tV3I5lKlMQmjTV/jWRBCE='
WHERE
key_id = '63dda05a6a8a3604577cad70181ae473449149995be13cc431b39e479b019050'
AND (
token = '/nw4l/E5g9VtLKx7sWtrt6tV3I5lKlMQmjTV/jWRBCE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)