UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zedIvyauQaElXbwu6mj5WJyTT8nngbJEaJiMquvCaQ4='
WHERE
key_id = '60e4e538218f5769112be502e52db710fb8a9ae9a14992e9892567e596f5e3fc'
AND (
token = 'zedIvyauQaElXbwu6mj5WJyTT8nngbJEaJiMquvCaQ4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)