UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FRA0Nh5ArIrAgK7fdtIttCPg1oSQNOSkrtD/JaRqJH8='
WHERE
key_id = '1d1c73957c35e5d1b9e0fdcd2a1a3acd3c4d099eca904e17fc19b6e43af84e03'
AND (
token = 'FRA0Nh5ArIrAgK7fdtIttCPg1oSQNOSkrtD/JaRqJH8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)