UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zMRPa74XU/WIwcCwNPSfpkOmrisLRXKoF++yJJnBsSY='
WHERE
key_id = '976115ef2d014430e6fbfa90a7da75f14044dca15bc597ed6bb051bf6d2177c1'
AND (
token = 'zMRPa74XU/WIwcCwNPSfpkOmrisLRXKoF++yJJnBsSY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)