UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EpY/dr2yjYszjiAgSGzaL9WYpNoNlYfhSRp5LDQHbbc='
WHERE
key_id = '5ed6d1923ef67dcf44cef0db364b28ad9a7a6a02bd079ea32ec5edfd3e1e7033'
AND (
token = 'EpY/dr2yjYszjiAgSGzaL9WYpNoNlYfhSRp5LDQHbbc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)