UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pgzzA/OQBJHToLXugK091LJX8UqlJ8rUwMC9/32zJFQ='
WHERE
key_id = '917f2f3d5f167ecd94e9e3ccb8045da1062d015269d052ab5ea60ea8ee69da67'
AND (
token = 'pgzzA/OQBJHToLXugK091LJX8UqlJ8rUwMC9/32zJFQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)