UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jhTkDUKfzSsneWZZVSl1XBqmK0lGPxdb3KH9UVeQhvw='
WHERE
key_id = 'a1bf126650d6361319bcef4fd1e4056f9aeab6f80cda37f5dc9912fabd89b266'
AND (
token = 'jhTkDUKfzSsneWZZVSl1XBqmK0lGPxdb3KH9UVeQhvw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)