UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZP5P7qE2Jbyrn/2ytk38C5fVI6S+1Qk+KZHeKPTVLQ4='
WHERE
key_id = '5e56ea7a4499fe64481102d56ec6443b102a11d37f7766b9ea0c06dfe2f1b807'
AND (
token = 'ZP5P7qE2Jbyrn/2ytk38C5fVI6S+1Qk+KZHeKPTVLQ4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)