UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'u5T62JTgGI2Cf/Fm/ltmsRTgs9nC0f6SBJbFZOM4bIE='
WHERE
key_id = 'd75cd9a06f5e268d9f6f020480e9e568ca1d4c33115609febf2519da874b681c'
AND (
token = 'u5T62JTgGI2Cf/Fm/ltmsRTgs9nC0f6SBJbFZOM4bIE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)