UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'u3TnLkQmgZiVLNUtVNl/HCu9EWQwdpGaZy2B0DKI3mk='
WHERE
key_id = '4abae627e306fa2aedda8e1e263798ed27449420f0b3602c91919dfe0e75d577'
AND (
token = 'u3TnLkQmgZiVLNUtVNl/HCu9EWQwdpGaZy2B0DKI3mk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)