UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/RDnxj+KWH1yTfTv21HmJVTHVSUGekD7YB6VZycI2PM='
WHERE
key_id = '30864c1e0dfd3c7edeaebfbe68cb08968a23100c1962eefea2e063a2ee3c9b91'
AND (
token = '/RDnxj+KWH1yTfTv21HmJVTHVSUGekD7YB6VZycI2PM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)