UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Lkayoa3QTCWAMCFDzjRR7ZWaIrkxi/GTrJMUYbjm1Ro='
WHERE
key_id = '75141e3d087067edcadab15b555f888614a1c77e5877f8daec06e545d22cf536'
AND (
token = 'Lkayoa3QTCWAMCFDzjRR7ZWaIrkxi/GTrJMUYbjm1Ro='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)