UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OvoGirFGwB4fx1Phq3B/5jyMQTb//tkBlq8gwp9k8hM='
WHERE
key_id = '7e20af56712d4f1e90682ef79ecf7205ad5e098da1b855bc94980712d554d1a7'
AND (
token = 'OvoGirFGwB4fx1Phq3B/5jyMQTb//tkBlq8gwp9k8hM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)