UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DBKZCo0ufPaE4NDSZ/s4RBtEZyTTOOYcdJUAgHCMpEs='
WHERE
key_id = '5dfc6faab77b61e6c66e7e4ee4e86fa909871c7629fba6cddbacbe7b24c1891e'
AND (
token = 'DBKZCo0ufPaE4NDSZ/s4RBtEZyTTOOYcdJUAgHCMpEs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)