UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hhWOeb/DmzOB1KdFYn6gRFlIi4RBy8Ei5kOjYkIRWLw='
WHERE
key_id = '751e780622819a50b7b6a6b6bc0c2f41de6c533091873fc00cce57e05b0c940d'
AND (
token = 'hhWOeb/DmzOB1KdFYn6gRFlIi4RBy8Ei5kOjYkIRWLw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)