UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2UrbJM2O7y7jTLBXredc7MZZBBk/vTxPgMUrsi7paaY='
WHERE
key_id = 'e21869ce38aa87ed8bea075eaa7fda3fd010d84e25e0ced10ef7167999c840ac'
AND (
token = '2UrbJM2O7y7jTLBXredc7MZZBBk/vTxPgMUrsi7paaY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)