UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PSgiFO/S8UOrApe7Kocn7vDIN3qL4/bvZD9hznVIBzY='
WHERE
key_id = '0460e616b1ebfe8ce155595d05a98f482644d449dd195f12e4af4f0bc06d82ad'
AND (
token = 'PSgiFO/S8UOrApe7Kocn7vDIN3qL4/bvZD9hznVIBzY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)