UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WtYeo0Mh+z57AYztm4K/JM5GGhQPKXxTx6h56HrXULE='
WHERE
key_id = '26d024849bf4fbbb6e290ab7af2a449803b4459914c5b00666653f4273352494'
AND (
token = 'WtYeo0Mh+z57AYztm4K/JM5GGhQPKXxTx6h56HrXULE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)