UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5I4U/n2u8VCE12kpmh846Uwyj/BfmxdReUYzExzbb3U='
WHERE
key_id = '92ffab29edfe62c1c19516bd279e11972a0ecee2484b384b6e2bd625c2e646a1'
AND (
token = '5I4U/n2u8VCE12kpmh846Uwyj/BfmxdReUYzExzbb3U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)