UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'CEkE4s58SLv1KrqeDePIR1F3mSLi+Vec5FWfrDN/J/A='
WHERE
key_id = '74a8d89893f883019fa9b1c65a81e9eaff7f00d7008f8e771838c48b7952d664'
AND (
token = 'CEkE4s58SLv1KrqeDePIR1F3mSLi+Vec5FWfrDN/J/A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)