UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2fNmSKCJNxCX+S2OeTbMA6EJ7wXQnfXPX4QehNhUqhI='
WHERE
key_id = '80b597fb859a5f7e53248558f44456b93396a9c109f8e83755bf270b7b859c86'
AND (
token = '2fNmSKCJNxCX+S2OeTbMA6EJ7wXQnfXPX4QehNhUqhI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)