UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'vuFw5D2GDDHMFwzbUxIpA/eruZb9HqKGPg6yKM/5/8k=' 
WHERE 
  key_id = '25bd7262a61ecd4bc17af2414e4d08c8d3f76a93cebf45e823679606ddfbc117' 
  AND (
    token = 'vuFw5D2GDDHMFwzbUxIpA/eruZb9HqKGPg6yKM/5/8k=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039