UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'X1HwyHtZZgvbiwNEVNHHsV8VCKaj3XBAdz5j8t4NWkk=' 
WHERE 
  key_id = '0f26cc37479e288193b682dd8e55ea7ab0e356b5d2f0638b5bac7c86e69b1cf0' 
  AND (
    token = 'X1HwyHtZZgvbiwNEVNHHsV8VCKaj3XBAdz5j8t4NWkk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025