UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DipRDEoqMYtLQl4lgD6ODTTlRvSfqnuoljEbR15uXSM='
WHERE
key_id = '36db8c1710da094c9e1874fd35ebb38c361572398f0e4eaae6cfc7f6342ec01c'
AND (
token = 'DipRDEoqMYtLQl4lgD6ODTTlRvSfqnuoljEbR15uXSM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)