UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/vJUwEoAq1k2xPGPcBB9zWNL2VZb+K22lM9odBQOKg8='
WHERE
key_id = '483c1070ae26c988a28085b0faa9ccd3c54375ac256ff9c7b1f72d8d3437899e'
AND (
token = '/vJUwEoAq1k2xPGPcBB9zWNL2VZb+K22lM9odBQOKg8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)