UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Jk3bkvFLEw+7542PYREyGXWlSpvThm/ErcFmaXKuy6o=' 
WHERE 
  key_id = '2d0367ed6f950ccf3e274764c3bcc59dc62916a9eb847eccf566958c7911412b' 
  AND (
    token = 'Jk3bkvFLEw+7542PYREyGXWlSpvThm/ErcFmaXKuy6o=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00048