UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 's3DvALYpTv+xOuBabqFqjb2+/fNncimnPjjS5FjNlug=' 
WHERE 
  key_id = '081e790f94e7b1ca52005b4c72da7c80ca0a0801e975d5f6e01b75bebb0dd291' 
  AND (
    token = 's3DvALYpTv+xOuBabqFqjb2+/fNncimnPjjS5FjNlug=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030