UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UGihVEzAa47ZAXlsSyVZ3PoM/GhBJ8kpHJf7dXQ3tgY='
WHERE
key_id = '2444d332b79c1d75280eed1153a06198cc21f8aa2a52f5c52b4e28f2d1ba0f08'
AND (
token = 'UGihVEzAa47ZAXlsSyVZ3PoM/GhBJ8kpHJf7dXQ3tgY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)