UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zKQG6UmUgsTlTYwr1iOmS5NfvLn8iWjANlc+QAJjFsI='
WHERE
key_id = '6bc0bf7100af5f8fe8fd0c2f790da028c4680cf6e84bee552e4eb882f3981c71'
AND (
token = 'zKQG6UmUgsTlTYwr1iOmS5NfvLn8iWjANlc+QAJjFsI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)