UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'NCCk2Xf0DV7M975Vm8yzN23iQc1+E/MGj/VTOohUvXo='
WHERE
key_id = '42fb855edf9cb4d82ff2ad6e52361fdd8cf1d90e2fafa0ba53557a93999f7302'
AND (
token = 'NCCk2Xf0DV7M975Vm8yzN23iQc1+E/MGj/VTOohUvXo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)